package com.fly.annotation;

import com.fly.service.DepartmentService;
import com.fly.utils.ApplicationContextRegister;

import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;
import javax.validation.ConstraintViolation;
import javax.validation.Path;
import javax.validation.metadata.ConstraintDescriptor;

/**
 * @author Fly
 * @Description
 * @Date Created in 11:28 2018/1/31
 * @Modified by
 */
public class UniqueClass implements ConstraintValidator<Unique,Object> {


    private String message ;


    @Override
    public void initialize(Unique unique) {
        this.message = unique.message();
    }

    @Override
    public boolean isValid(Object object, ConstraintValidatorContext constraintValidatorContext) {
        String msg = (String) object;
        return false;
    }
}
